import httpInstance from '@/utils/http'

// 封装获取banner图的接口
export function getBannerAPI(params = {}) {
   // 默认为1，商品为2
   const { distributionSite = '1' } = params
   return httpInstance({
      url: '/home/banner',
      params: {
         distributionSite
      }
   })
}

// 封装获取新鲜好物数据的接口
export function getNewAPI() {
   return httpInstance({
      url: '/home/new'
   })
}

// 获取人气好物数据的接口
export function getHotAPI() {
   return httpInstance({
      url: '/home/hot'
   })
}

// 获取产品数据接口
export function getProductAPI() {
   return httpInstance({
      url: '/home/goods'
   })
}